package com.hx.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.hx.entity.Major;
import com.hx.repository.MajorRep;

@Component
public class MajorService {
	@Autowired
	private  MajorRep majorRep;
	
	public List<Major> getAll(){
		
		return (List<Major>) majorRep.findAll();
	}
	
	public Major getOne(Integer id){
		return majorRep.findOne(id);
	}
}

